<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>注册</title>
{include file="Public/header"/}
</head>
<!--注册-->
<div class="clearfix clearfix80"></div>
<div class="container-fluid">
    <div class="container">
        <form class="form-horizontal" method="post" onsubmit="" action="/index/Addnewly/useraddCard">
            <div class="form-group">
                <label for="uPhone" class="col-md-3 col-md-offset-1 control-label">身份证号&nbsp;<b class="redFont">*</b></label>
                <div class="col-md-5">
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-phone" id='zzzsj'></span></span>
                         <input type="text" class="form-control" id="regUserName" name="mobile" placeholder="请输入身份证号" aria-required="true" aria-describedby="firstname1-error" aria-invalid="true">
                    </div>
                    <p class="help-block" id="sj">请填写6~16位数字字母密码</p>
                </div>
            </div>
            <div class="form-group">
                <label for="uPassword" class="col-md-3 col-md-offset-1 control-label">密码&nbsp;<b class="redFont">*</b></label>
                <div class="col-md-5">

                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock" id='zzzpwd'></span></span>
                          <input type="password" class="form-control" id="regUserPassword" name="pwd" placeholder="请输入6~15英文数字密码" aria-required="true" aria-describedby="firstname1-error" aria-invalid="true">
                    </div>
                    <!-- ^[A-Za-z0-9]{6,8}$ -->
                    <p class="help-block" id="pwd">请填写6~16位数字字母密码</p>
                </div>
            </div>
            <div class="form-group">
                <label for="uAlignPwd" class="col-md-3 col-md-offset-1 control-label">确认密码&nbsp;<b class="redFont">*</b></label>
                <div class="col-md-5">
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock" id='zzzpwds'></span></span>
                        <input type="password" class="form-control" id="regUserConfirmPassword" name="pwds" placeholder="请再次输入密码" aria-required="true"  aria-describedby="firstname1-error" aria-invalid="true">
                    </div>
                    <p class="help-block" id="pwds">请再次填写密码</p>
                </div>
            </div>
            <div class="form-group">
                <label for="uAgentid" class="col-md-3 col-md-offset-1 control-label">推荐人&nbsp;<b class="redFont">*</b></label>
                <div class="col-md-5">
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-user" id="recode"></span></span>
                      
                          {if condition="empty($_GET['tjm'])"}
                                <input type="test" class="form-control" id="bdUserRecommender" name="refereecode" placeholder="推荐人" aria-required="true" aria-describedby="firstname1-error"  aria-invalid="true" value="" >
                                <label id="bdUserRecommender-error" class="error" for="bdUserRecommender"></label>
                            {else\}
                                <input type="test" class="form-control" id="bdUserRecommender"name="refereecode" placeholder="推荐人" aria-required="true" aria-describedby="firstname1-error"  aria-invalid="true" checked="" readonly="readonly" value="{:isset($_GET['tjm'])?$_GET['tjm']:''}" checked="" >
                                <label id="bdUserRecommender-error" class="error" for="bdUserRecommender"></label>
                            {/if}
                    </div>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-4 col-md-6">
                    <div class="checkbox">
                        <label>
                           <input type="checkbox" id="regAgree" name="regAgree" value="regAgree" aria-required="true" aria-describedby="regAgree-error">
											<!--<span class="glyphicon glyphicon-remove form-control-feedback"></span>-->
                            同意 <a href="javascript:void(0);" class="" data-toggle="modal" data-target=".regModalUser">《网站免责申明》</a>
                        </label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-3 col-md-offset-1 control-label"></label>
                <div class="col-md-5">
                    <button type="submit" class="btn btn-success btn-block" value="注册" id="Userregister">注册</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="clearfix clearfix80 hidden-xs"></div>
<div class="clearfix clearfix80 hidden-xs"></div>
<div class="clearfix clearfix80 hidden-xs"></div>



<!--footer-->
{include file="Public/footer"/}
<!--footer-->

<!--用户注册及隐私协议-->
<div class="modal fade regModalUser" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered" role="document" style="margin-top:150px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title float-left">
                    网站免责申明
                </h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div style="background-color: #FFFFFF; border:#dfe6ea solid 1px; padding: 5px 12px;">
                    <h4 align="justify"
                        style="color:#666666;font-family:Verdana, Geneva, sans-serif;text-indent:0pt;text-align:justify;background:#FFFFFF;">
                        <h5 class="MsoNormal" style="text-align:center;">
                            <!--用户注册及隐私协议-->鑫牛管家声明
                        </h5>

                        <p>本网站所载的各种信息和数据等仅供参考，均不构成任何投资指导建议。投资者应仔细审阅相关产品的合同文件等资料，以了解其风险因素。市场有风险，买者自负，请谨慎投资。</p>
                        <p>特别声明：</p><br>
                        <p>1、鑫牛管家仅提供资金撮合服务，任何以个人或平台运营商名义进行的营销行为本平台均不参与；</p>
                        <p>2、鑫牛管家没有交易推荐、大盘分析等证券投资咨询服务资质，所有的分析咨询材料仅供交流参考；</p>
                        <p>3、鑫牛管家不参与客户的任何买卖操作或指导；</p>
                        <p>4、鑫牛管家从未进行过任何保证投资收益或分担投资损失的承诺。任何个人或机构均不应依赖本网站所提供的数据做出投资决策，本网站所提供的数据或信息仅供浏览或参考，不构成任何投资建议。请在继续浏览股策略网站前，确保您已经仔细阅读了此风险声明！</p>
                        <p>请在继续浏览股策略网站前，确保您已经仔细阅读了此风险声明！</p>
						
                    </h4>
                    <div style="text-align: center">
                        <!--<input type="button" value="关 闭" align="center" onclick="callPClose()">-->
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" data-dismiss="modal">同意</button>
                <button type="button" class="btn btn-danger toHome">不同意</button>
            </div>
        </div>
    </div>
</div>
<!--用户注册及隐私协议结束-->
<!--<script type="text/javascript" src="/static/home/js/jquery-3.3.1.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>-->
<!--<script src="/static/home/js/personal_head_menu.js"></script> -->

    <!--pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？《》]  ");-->


</body>
</html>
<script type="text/javascript">

    //模态框默认背景键盘不能点击
    $('.regModalContract').modal({backdrop: 'static', keyboard: false, show: true});


    $(".toHome").click(function(){
        window.location.href = "/";
    });

    //阅读合同条款指定时间
    function regRunTimer(k) {
        $(".regCloseTerms").html("倒计时: <b class='fontRed'>" + k + "</b>S后可以关闭");
        k--;
        if (k >= 0) {
            timer = setTimeout(function () {
                regRunTimer(k)
            }, 1000);
        }
        else {
            $(".regCloseTerms").hide();
            $(".regCloseTerms").next("button").attr("data-dismiss", "modal");
        }
    };
    regRunTimer(1);//调用倒计时
</script>

 <!--<script type="text/javascript" src="/static/home/js/jquery.min.js"></script>-->
<script>
    flag=false;fapwd=false;fapwds=false;fs=false;rec = false;
    $("#regUserName").focus(function(){
        $("#sj").html('');
    }).blur(function(){
        pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？《》]");
        var mobile = $("#regUserName").val();
        if(pattern.test(mobile)){
            $("#sj").html('不能使用特殊字符').css('color','red');
            flags = false;
        }else{
            $.ajax({
                url : '/index/register/userIdcard',
                type: "POST",
                data:{
                    mobile:mobile,
                },
                success:function(data){
                    if(data['msg']=='success'){
                        flag = true;
                    }else{
                        $("#sj").html(data['msg']).css('color','red');
                        $("#regBtnSmsCode").attr("disabled",true);
                        flag = false;
                    }
                }
            })
        }
    });

    $("#regUserPassword").focus(function(){
        $("#pwd").html('');
    }).blur(function(){
        var pwd = $("#regUserPassword").val();
        if(pwd!=null){
            if(pwd.match(/^[0-9a-zA-Z]+$/) == null){
                $("#pwd").html('密码格式错误').css('color','red');
                fapwd = false;
            }else{
                 if(pwd.length >= 6 && pwd.length <= 15){
                    fapwd = true;
                 }else{
                    $("#pwd").html('密码格式错误').css('color','red');
                    fapwd = false;
                 }
            }
        }else{
            $("#pwd").html('密码不能为空').css('color','red');
            fapwd = false;
        }
    });

    $("#regUserConfirmPassword").focus(function(){
        $("#pwds").html('');
    }).blur(function(){
        var pwds = $("#regUserConfirmPassword").val();
        var pwd  = $("#regUserPassword").val();
        if(pwd!=pwds){
            $("#pwds").html('密码不一致').css('color','red');
            fapwds = false;
        }else{
            fapwds = true;
        }
    });

    $("form").submit(function(){
        var a = $("input[name='regAgree']:eq(0)").prop("checked");
        if(!a){
            alert('请阅读期货交易商合同和隐私条款');
            fs = false;
        }else{
            fs = true;
        }
        var recode = $("input[name='refereecode']").val();
        // alert(recode);
        if(recode){
            $.ajax({
                url:'/index/Addnewly/refereeCode',
                type:'post',
                async:false,
                data:{
                    recode:recode,
                },
                success:function(data){
                    if(data['msg']!='success'){
                        // alert('推荐码错误');
                    $("#recode").html(data['msg']).show().css('color','red');
                    //$("#res").html('推荐人不存在').show().css('color','red');
                        rec = false;
                    }else{
                        rec = true;
                    }
                }
            })
        }else{
            // alert('推荐码不能为空');
            $("#recode").html('推荐码不能为空').show().css('color','red');
            rec = false;
        }
        if(!flag||!fapwd||!fapwds||!fs||!rec){
            return false;
        }else{
            return true;
        }

    });


</script>
<!--
                               _ooOoo_
                              o8888888o
                              88" . "88
                              (| -_- |)
                              O\  =  /O
                           ____/`———'\____
                         .'  \\|     |//  `.
                        /  \\|||  :  |||//  \
                       /  _||||| -:- |||||-  \
                       |   | \\\  -  /// |   |
                       | \_|  ''\————/''  |   |
                       \  .-\__  `-`  ___/-. /
                     ___`. .'  /__.__\  `. . __
                  ."" '<  `.___\_<|>_/___.'  >'"".
                 | | :  `- \`.;`\ _ /`;.`/ - ` : | |
                 \  \ `-.   \_ __\ /__ _/   .-` /  /
            ======`-.____`-.___\_____/___.-`____.-'======
                               `=__='
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     佛祖保佑       永无BUG
-->